import request from '@/utils/request'

// 查询试卷列表
export function paperList(query) {
  return request({
    url: '/study/paper/list',
    method: 'get',
    params: query
  })
}
// 新增试卷
export function addpaper(data) {
  return request({
    url: '/study/paper',
    method: 'post',
    data: data
  })
}


// 获取试卷详细信息
export function paperId(id) {
  return request({
    url: `/study/paper/${id}`,
    method: 'get',
  })
}


// 修改试卷
export function eitHpaper(data) {
  return request({
    url: '/study/paper',
    method: 'put',
    data: data
  })
}

// 删除试卷
export function delpaper(id) {
  return request({
    url: `/study/paper/${id}`,
    method: 'delete'
  })
}

// 导出品类列表
export function exporTpaper(data) {
  return request({
    url: '/study/paper/export',
    method: 'post',
    data: data
  })
}

// 审核试卷
export function paperAudit(query) {
  return request({
    url: '/study/paper/audit',
    method: 'get',
    params: query
  })
}

// 下架试卷
export function notpublished(query) {
  return request({
    url: '/study/paper/not-published',
    method: 'get',
    params: query
  })
}


// 发布试卷
export function paperpublish(query) {
  return request({
    url: '/study/paper/publish',
    method: 'get',
    params: query
  })
} 

// 查询试题含答案的列表
export function listall(query) {
  return request({
    url: '/study/topic/list-all',
    method: 'get',
    params: query
  })
} 
